package icasue.base.lock;


import icasue.base.lock.expecion.ServiceTimeOutException;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2020/11/3 下午3:45
 * @UpdateDate:
 * @Description: 并发锁抽象.
 */
public interface DistributedLock {

    String tryLock(String serviceLock);

    String tryLock(String serviceLock, Long timeMs);

    String lock(String serviceLock);

    String lock(String serviceLock, Long timeMs);

    void unlock(String serviceKey, String credential) throws ServiceTimeOutException;
}

